package com.ezops.dtcc;

import java.util.Calendar;
import java.util.List;

import org.apache.log4j.Logger;

import com.ezops.dtcc.model.ReportingMessage;

import com.ezops.dtcc.model.dao.ReportingMessageDAO;;

public class SendTrades {
	private final static Logger LOGGER = Logger.getLogger(SendTrades.class);
	private List<ReportingMessage> listTrades;
	private ReportingMessageDAO  reportingMessageDAO;
	
	public SendTrades(ReportingMessageDAO  reportingMessageDAO) {
		this.reportingMessageDAO = reportingMessageDAO;
	}
	
	public void send() {
		listTrades = reportingMessageDAO.selectAllTrades(Calendar.getInstance().getTime(), Calendar.getInstance().getTime());
		for(ReportingMessage reg : listTrades) {
			LOGGER.info("Sending Over Trades to DTCC ->"+reg);
		}
	}
}
